package com.zhaowudi.wj.dao;

import com.zhaowudi.wj.pojo.Book;
import com.zhaowudi.wj.pojo.Category;
import org.apache.ibatis.annotations.Mapper;
import org.springframework.stereotype.Repository;

import java.util.List;

@Mapper
@Repository
public interface BookDAO  {
    List<Book> findAllByCategory(Category category);
    List<Book> findAllByTitleLikeOrAuthorLike(String keyword1, String keyword2);
    List<Book> findAll(String OrderBy);
    void add(Book book);
    void addEX(List<Book> booklist);
    void deleteById(int id);

/*
    public List<Book> list() {
        Sort sort = new Sort(Sort.Direction.DESC, "id");
        return bookDAO.findAll(sort);
    }

 */
}
